import type { FC } from 'react';
import style from './index.less';
import React, { Fragment, useState, useEffect } from 'react';
import { Button, Card, Form, Input, Radio } from 'antd';
import { updateAvatar, currentUser } from './service';
interface Props {}
/** 问题
 * 1. 页面加载 赋初值userInfo 会有延时问题 导致表单初始值赋不上
 * @returns
 *
 *
 *
 */
const BasicInfo: FC<Props> = () => {
  const [userInfo, setUserInfo] = useState();
  // 输入框是否显示
  const [inputStatu, setInputStatu] = useState(false);
  const onFinish = () => {};
  useEffect(() => {
    currentUser({ user_id: localStorage.getItem('user_id') }).then(res => {
      setUserInfo({ ...res.data });
    });
  }, []);
  return (
    <div className={style.container}>
      <div className="site-card-border-less-wrapper">
        <Card title="入门书籍推荐" bordered={true} className={style.card}>
          <div className={style.box}>
            <div className={style.img}></div>
            <div className={style.text}>
              <span className={style.book}>Web前端工程师修炼之道</span>
              <span className={style.name}>Jennifer NiderstRobbins</span>
            </div>
          </div>
          <div className={style.box}>
            <div className={style.img}></div>
            <div className={style.text}>
              <span className={style.book}>Web前端工程师修炼之道</span>
              <span className={style.name}>Jennifer NiderstRobbins</span>
            </div>
          </div>
          <div className={style.box}>
            <div className={style.img}></div>
            <div className={style.text}>
              <span className={style.book}>Web前端工程师修炼之道</span>
              <span className={style.name}>Jennifer NiderstRobbins</span>
            </div>
          </div>
          <div className={style.box}>
            <div className={style.img}></div>
            <div className={style.text}>
              <span className={style.book}>Web前端工程师修炼之道</span>
              <span className={style.name}>Jennifer NiderstRobbins</span>
            </div>
          </div>
          <div className={style.box}>
            <div className={style.img}></div>
            <div className={style.text}>
              <span className={style.book}>Web前端工程师修炼之道</span>
              <span className={style.name}>Jennifer NiderstRobbins</span>
            </div>
          </div>
        </Card>
      </div>
    </div>
  );
};

export default BasicInfo;
